# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Behem0th <grantipak@gmail.com>

pkgname=libvdpau-va-gl
pkgver=0.4.2
pkgrel=3
pkgdesc='VDPAU driver with OpenGL/VAAPI backend'
arch=('loong64' 'x86_64')
url='https://github.com/i-rinat/libvdpau-va-gl'
license=('LGPL3')
depends=('gcc-libs' 'glibc' 'libgl' 'libvdpau' 'libx11'
         'libva.so' 'libva-x11.so')
makedepends=('cmake')
source=("libvdpau-va-gl-${pkgver}.tar.gz::https://github.com/i-rinat/libvdpau-va-gl/archive/v${pkgver}.tar.gz")
sha256sums=('7d9121540658eb0244859e63da171ca3869e784afbeaf202f44471275c784af4')

prepare() {
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd build

  cmake ../libvdpau-va-gl-${pkgver} \
    -DCMAKE_BUILD_TYPE='Release' \
    -DCMAKE_INSTALL_PREFIX='/usr'
  make
}

package() {
  cd build

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
